package com.zhkj.lib.http

import com.zhkj.lib.R
import com.zhkj.lib.base.BaseApplication

interface HttpResponseStatus {
    enum class Status {
        START, SUCCESS, FAILURE
    }

    var status: Status
    var exception: Throwable?
    val statusTip: String
        get() = when (status) {
            Status.START -> BaseApplication.INSTANCE.resources.getString(R.string.tip_start)
            Status.SUCCESS -> BaseApplication.INSTANCE.resources.getString(R.string.tip_success)
            Status.FAILURE -> exception?.message ?: ""
        }
}